<template>
    <view class="container">
        <view @click="Common.toUrl('/pages/user/UpdateInfo',true)" class="member">
            <view class="box">
                <block v-if="Auth.isLogin()">
                    <image :src="State.user.avatar" class="avatar" mode="aspectFill"></image>
                    <view class="info">
                        <view class="nickname">{{State.user.nickname}}</view>
                        <view class="time">UID：{{State.user.uid}}</view>
                    </view>
                </block>
                <block v-else>
                    <image :src="Config.OSS_HOST+'/static/avatar.png'" class="avatar" mode="aspectFill"></image>
                    <view class="info">
                        <view class="nickname">登录/注册</view>
                    </view>
                </block>

                <view class="arrow">
                    <uni-icons type="right" size="20" color="#FFFFFF"></uni-icons>
                </view>
            </view>
        </view>
        <!-- <view class="member-wallet">
            <view @click="Common.toUrl('/pages/user/CollectList',true)" class="item">
                <view>{{ State.user.collectCount }}</view>
                我的收藏
            </view>
            <view @click="Common.toUrl('/pages/user/wallet/index',true)" class="item">
                <view>{{ State.user.accountBalance }}</view>
                钱包
            </view>
        </view> -->
		
		<!-- <view v-if="State.user.agencyGrade" class="team">
		    <view class="title">
		        <view class="left">团队数据</view>
		        <view class="right" @click="Common.toUrl('/pages/user/wallet/index')">
		            查看更多
		            <uni-icons type="right" size="16" color="#BBBBBB"></uni-icons>
		        </view>
		    </view>
		    <view class="data" @click="Common.toUrl('/pages/user/wallet/index')">
		        <view class="item">
		            <view class="up"><text>{{teamData.inviteNum}}</text>人</view>
		            <view class="bottom">直推用户</view>
		        </view>
		        <view class="item">
		            <view class="up"><text>{{teamData.teamNum}}</text>人</view>
		            <view class="bottom">团队人数</view>
		        </view>
		        <view class="item">
		            <view class="up"><text>{{teamData.vipMoney}}</text>元</view>
		            <view class="bottom">团队充值</view>
		        </view>
		    </view>
		</view> -->

        <uni-list style="margin-top:20px;">
            <!-- <uni-list-item @click="Common.toUrl('/pages/mall/OrderList',true)" :clickable="true" title="我的订单" :show-extra-icon="true" showArrow :extra-icon="extraIcon" />
            <uni-list-item @click="Common.toUrl('/pages/user/NotifyList',true)" :clickable="true" title="系统消息" :show-extra-icon="true" showArrow :extra-icon="extraIcon" /> -->
            <uni-list-item @click="Common.toUrl('/pages/user/Setting',true)" :clickable="true" title="设置" :show-extra-icon="true" showArrow :extra-icon="extraIcon" />
        </uni-list>

    </view>

</template>

<script>

import store from "../../store";

export default {
    data() {
        return {
			Config: this.$Config,
			Common: this.$Common,
			Auth: this.$Auth,
			ShareUtil: this.$ShareUtil,
			State: this.$store.state,
			Dict: this.$Dict,
			
            teamData:{
                inviteNum:0,
                vipNum:0,
                vipMoney:0.00,
                teamNum:0,
            },
            extraIcon: {
                color: '#4cd964',
                size: '22',
                type: 'gear-filled'
            }
        }
    },
    onLoad() {

    },
    onShow() {
    },
    onPullDownRefresh() {
        this.$store.dispatch('user/getInfo')
    },
    methods: {
        clearStore(){
            this.$store.dispatch('region/setStreetCode','')
            this.$store.dispatch('region/setLng','')
            this.$store.dispatch('region/setLat','')
        }
    }
}
</script>
<style lang="scss" scoped>
.container{padding-bottom: 10px;}

.member{background:#FF7A01; padding-top:var(--status-bar-height); width:100%; }
.member .box{ display:flex; align-items: center; padding:0px 10px 30px 10px; width:100%; }
.member .avatar{ width:60px; height:60px; border-radius:30px;}
.member .info{flex: 1; margin-left: 15px;}
.member .info .nickname{  color:#FFF; font-size:18px; margin-bottom: 4px; }
.member .info .time{  color:#FFF; font-size:13px; }
.member .arrow{ width:40px; color:#FFFFFF; justify-content: flex-end; display: flex;}

.member-wallet{ width:94%; margin:-20px auto 0 auto; border-radius:10px; background: #FFF;  display: flex; border-top:1px solid #F6F6F6; border-bottom:1px solid #EFEFEF;}
.member-wallet .item { flex:1; padding:10px; text-align: center; vertical-align:bottom;}
.member-wallet .item view{ display: block; color:#FF7A01; font-size:16px; font-weight:bold; height:40px; line-height: 40px;}
.member-wallet .item .bd_wx{ font-size:30px; margin-bottom:-10px; color:#55AD23; font-weight:normal;}

.member-box{ width:94%; margin:10px auto 0 auto; background:#FFF; border-radius:10px;}
.member-box .title{ height:30px; line-height:30px; border-bottom:1px solid #EEE; margin:0 10px; font-weight: bold; }
.member-box .con{ overflow:hidden; padding:10px;}
.member-box .con .item{ display:block; float:left; margin-right:22px; text-align:center;}
.member-box .con .item img{ width:30px; height:30px; margin-bottom:0px;}
.member-box .con .item view{ font-size:14px; margin-top:2px;}

.team{ background: #FFF; margin-top:10px; border:solid #F2F2F2; border-width: 1px 0; padding:15px;}
.team .title{ display: flex; justify-content: space-between; border-bottom: 1px solid #F2F2F2; padding-bottom: 10px;}
.team .title .right{color:#999; font-size: 14px;}
.team .data{ display: flex; justify-content: space-around; padding:20px 0 5px 0;}
.team .data .item{ text-align: center; }
.team .data .item .up{ color:#DCDCDC; font-weight: bold;}
.team .data .item .up text{ color:$uni-global-color; font-size: 20px; margin-right:5px; }
.team .data .item .bottom{ color:#999; margin-top:5px; }



</style>
